var LoginLayer = cc.Layer.extend({
    ctor:function(){
        this._super();
    },
    onEnterScene:function(){

    },
    init:function(){
        this._super();
        var size = cc.Director.getInstance().getWinSize();
        var lazyLayer = cc.Layer.create();
        this.addChild(lazyLayer);
        this.backgroundSprite = cc.Sprite.create(s_LoginBackground);
        this.backgroundSprite.setPosition(cc.p(size.width /2,size.height/2));
        lazyLayer.addChild(this.backgroundSprite);
    }
});

var LoginScene = cc.Scene.extend({
   onEnter:function(){
       this._super();
       var layer = new LoginLayer();
       layer.init();
       layer.onEnterScene();
       this.addChild(layer);
       UISystem.selectUI("LoginUI");
       UISystem.activeLayerApply("onLogin",function(){
            app.getNetService().connect();
       });
   }
});